<html>
	<head>
		<title>snBench SSD Adminitration Console</title>
		<link href="/snbench/markup/sxe20050712.css" rel="stylesheet" title="Default"/>
	</head>
	<body bgcolor="#FFFFFF">
	<script type="text/javascript">

	function getReq() {
		var req = false;
		if(window.XMLHttpRequest) {
			try {
				req = new XMLHttpRequest();
			} catch(e) {
				req = false;
			}
		} else if(window.ActiveXObject) {
			try {
				req = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e) {
				req = false;
			}
		}
		if (! req) {
			alert("Your browser does not support XMLHttpRequest.");
		}
		return req;
	}
	
	function doHttp(method) {
		var req = getReq();
		var success = true;
		var error_msg = "";
		var URInode = document.getElementById("URI");
		var URI = URInode.value;

		target = document.getElementById("RESULT");
		
		try {
			req.open(method, URI, false);
			req.send("");
		} catch (e) {
			success = false;
			error_msg = "Error: " + e;
			target.innerHTML = error_msg;
		}
		if ((req.status != 200 && req.status != 304) 
			||(req.responseText != method))	{
			target.innerHTML = req.responseText;
		}
		else {
			document.innerHTML = req.responseText;
		}
	}
	</script>
	<h1>
		SSD Administration
	</h1>
		<div class="jumpto">
        <ul><li>[<a href="/snbench/sd/">SSD Root</a>]</li>
			<li>[<a href="/snbench/sd/node/">STEP Graph</a>]</li>
			<li>[<a href="/snbench/sd/sensor/">Sensors</a>]</li>
        </ul>
        </div>
		
	<!-- POST -->
	<b>Submit a new STEP program:</b><br/>
	<center>
	<table BORDER="0">
		<TR>
			<td>Select a STEP XML file to upload:</td>
		</TR>
		<TR>
			<td>
			<form action="/snbench/sd/" method="post" enctype="multipart/form-data">
				<INPUT type="file" name="program" enctype="snbench/program"/ size="40"/>
				<BR/>
				<INPUT type="submit" value="UPLOAD"/> 
				<INPUT type="reset"/>
			</form>
			</td>
		</TR>
	</table>			
	</center>
	<hr/>
		
	<!-- DELETE -->
	<b>Delete a STEP node/program via URI:</b><br/>
	<center>
	<table BORDER="0">
		<TR>
			<td>Specify the URI of the resource to DELETE:</td>
		</TR>
		<TR>
			<td>
			<form action="javascript:doHttp('DELETE');">
			<input type="text" size="40" value="/snbench/sd/node/" name="URI" id="URI"/>
			<BR/>
			<input type="submit" value="DELETE"/>
			<INPUT type="reset"/>
		<span id="RESULT"> </span>
			</form>
			</td>
		</TR>
	</table>
	</center>			
	<hr/>
		<div id="footer">
                    <img class="logo" src="/snbench/markup/logo.png"/>
          For more information on snBench and SSDs, please see                    
		  <a href="http://csr.bu.edu/snbench/">the snBench homepage</a>
.                </div>
                <div id="bottom"/>
            </body>
</html>